Duplicate Local Variable/Constant/Timer ^^^^^ **Definition:** * The same local variable, constant or timer is defined in two or more functions, test cases or altsteps running on the same component. **Code Example:** .. code-block:: java type component c { port ExamplePort p; } testcase tc1() runs on c { timer t; p.send("foo1"); t.start (10.0); alt { [] p.receive("bari") { // do something } [] any port.receive{ // error handling } [] t.timeout { // error handling } } } testcase tc2() runs on c { timer t; p.send("foo2"); t.start (20.0); alt { [] p.receive("bar2") { // do something } [] any port.receive { // error handling } [] t.timeout { // error handling } } } **References:** .. admonition:: Quality attributes * :octicon:`file-code;1em` - Code Example * :octicon:`comment-discussion;1em` - Cause and Effect * :octicon:`graph;1em` - Frequency * :octicon:`sync;1em` - Refactoring * `An approach to quality engineering of TTCN-3 test specifications `_ * `Pattern-based Smell Detection in TTCN-3 Test Suites `_ :octicon:`file-code;1em` :octicon:`comment-discussion;1em` :octicon:`sync;1em` * `Utilising Code Smells to Detect Quality Problems in TTCN-3 Test Suites `_